﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Kernel
{
    public partial class FormCatalogue : FormBase
    {
        public FormCatalogue()
        {
            InitializeComponent();

            this.textBox_catalogueName.Text = _cataName;
            this.textBox_copies.Text = _cateCopies;
        }

        public xmlCatalogue CatalogueItem { get { return _catItem; } }

        private xmlCatalogue _catItem;

        private static string _cataName = "";
        private static string _cateCopies = "1";

        private void button_submit_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            _catItem = new xmlCatalogue();
            _catItem.IsCustomer = true;
            _catItem.IsPrint = false;
            _catItem.PaperName = textBox_catalogueName.Text;
            _catItem.PaperCount = textBox_copies.Text;

            _catItem.PaperType = "*.*";
            _catItem.PaperCode = "";
            _catItem.FileName = "无";
            _catItem.FileType = "无";
            _catItem.PaperSpec = "无";

            _cataName = this.textBox_catalogueName.Text;
            _cateCopies = this.textBox_copies.Text;

            this.Close();
        }
    }
}
